package com.bsfcs.rag.entity;

public class TenantContext {
    private static final ThreadLocal<String> tenantId = new ThreadLocal<>();
    private static final ThreadLocal<String> userId = new ThreadLocal<>();

    public static void set(String tenant, String user) {
        tenantId.set(tenant);
        userId.set(user);
    }

    public static String getTenantId() { return tenantId.get(); }
    public static String getUserId() { return userId.get(); }

    public static void clear() {
        tenantId.remove();
        userId.remove();
    }
}
